package customer.zspt.cn.customer.components.chat.ChatOrderContent.OrderElementPg;

import android.content.Context;
import android.view.View;
import android.widget.SeekBar;
import android.widget.TextView;

import customer.zspt.cn.customer.R;

/**
 * Created by Administrator on 2018/8/16 0016.
 */

public class SeekBarView extends BaseView {

    private  SeekBar seekBar;
    private  TextView seekBarCuttent;
    public SeekBarView(Context context,String titleVaules,String defaultVaults) {
        super(context,titleVaules);
        View.inflate(context, R.layout.chat_order_content_seekbar,this);
        seekBarCuttent = (TextView) findViewById(R.id.seekBarCuttent);
        seekBarCuttent.setText(titleVaules+"("+defaultVaults+")");
        seekBar = (SeekBar) findViewById(R.id.seekBar);
        seekBar.setProgress(Integer.parseInt(defaultVaults));
        seekBar.setMax(100);
        //进度条改变的监听
        seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
            @Override
            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                seekBarCuttent.setText("滑块("+progress+")");
            }
            @Override
            public void onStartTrackingTouch(SeekBar seekBar) {

            }
            @Override
            public void onStopTrackingTouch(SeekBar seekBar) {

            }
        });
    }
    @Override
    public String result() {
        return null;
    }
}
